/**
 * 键盘事件
 * @author zhouzhanglin
 * @param bubbles false 键盘事件不支持冒泡
 * @param charCode 包含按下或释放的键的字符代码值
 * @param keyCode 按下或释放的键的键控代码值
 * @param keyLocation 指示键在键盘上的位置。
 * @param ctrlKey 是否同时按下了ctrl键
 * @param altKey 是否同时按下了alt键
 * @param shiftKey是否同时按下了shift键 
 * @returns {KeyboardEvent}
 */
KeyboardEvent = function(type,bubbles,charCode, keyCode, keyLocation, ctrlKey, altKey, shiftKey)
{
	Event.call(this,type,false); //调用父类构造
	this.className="KeyboardEvent";
	
	this._charCode = charCode?charCode:0;
	this._keyCode = keyCode?keyCode:0;
	this._keyLocation = keyLocation?keyLocation:0;
	this._ctrlKey = ctrlKey?ctrlKey:false;
	this._altKey = altKey?altKey:false;
	this._shiftKey = shiftKey?shiftKey:false;
} ;
FLASH.extend(KeyboardEvent , Event);
//事件类型常量
KeyboardEvent.KEY_DOWN = "keyDown";
KeyboardEvent.KEY_UP = "keyUp";


//=======getter/setter=====================
KeyboardEvent.prototype.getCharCode = function(){ return this._charCode ; };
KeyboardEvent.prototype.getKeyCode = function(){ return this._keyCode ; };
KeyboardEvent.prototype.gekeyLocation = function(){ return this._keyLocation ; };
KeyboardEvent.prototype.getCtrlkey = function(){ return this._ctrlKey ; };
KeyboardEvent.prototype.getAltkey = function(){ return this._altKey ; };
KeyboardEvent.prototype.getShiftkey = function(){ return this._shiftKey ; };
//=====================================